
package com.yidu.hbatsams.action;

import com.yidu.hbatsams.domain.User;
import com.yidu.hbatsams.domain.vo.UserRoleVo;
import com.yidu.hbatsams.domain.vo.UserVo;
import com.yidu.hbatsams.service.UserRoleService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.util.List;


/*
 * @Author 谭俊
 * @Description //用户角色
 * @Date 9:31 2019/10/30 0030
 * @Param 
 * @return 
 **/
@Controller
@RequestMapping("UserRole")
public class UserRoleController {

	@Resource
	private UserRoleService userRoleService;


	/**
	 * 查询全部数据
	 * @return
	 */
/*	@RequestMapping("findAll")
	@ResponseBody
	public List<UserRoleVo> findAll(){
		UserRoleVo userRoleVo = new UserRoleVo();
		List<UserRoleVo> list = userRoleService.findAll(userRoleVo);
		return list ;
	}
	*/

	@RequestMapping("findUserId")
	@ResponseBody
	public List<UserRoleVo> findUserId(HttpSession session){
		UserVo userVo=(UserVo)session.getAttribute("user");
		return userRoleService.findUserId(session);
		
	}
	
}
